<!--  -->
<template>
  <div>
    <!-- 面包屑 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
    </el-breadcrumb>
    <!-- 卡片视图区 -->
    <el-card>
      <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
        <el-form-item label="手机号" prop="mobile" label-width="100px">
          <el-input v-model="dataForm.mobile" placeholder="管理员手机号"></el-input>
        </el-form-item>
        <el-form-item label="登录密码" prop="password" label-width="100px">
          <el-input type="password" v-model="dataForm.password" placeholder="密码"></el-input>
        </el-form-item>
      </el-form>
      <el-button type="primary" @click="dataSubmit()">确定更改</el-button>
    </el-card>
  </div>
</template>

<script>
export default {
  data () {
    return {
      dataForm:{
        mobile:"15042920670",
        password:'admin'
      },
      dataRule:{
        mobile:[{ required: true, message: '请输入手机号', trigger: 'blur' }],
        password:[{ required: true, message: '请输入密码', trigger: 'blur' }]
      }
    };
  },
  methods:{
      async dataSubmit() {
        const {data:res} = await this.$http.post("/dqxmall/userinfo/update",this.dataForm)
        //  console.log(res)
         if(res.msg === "success"){
            //   window.sessionStorage.setItem("userInfo",JSON.stringify(this.userList),{domain:'localhost'})
            //  this.getUserList()
              this.$message.success("保存成功")
         }
      },
      
    }
  

}

</script>
<style lang='less' scoped>
</style>